package com.huazai.completable;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

/**
 * @description
 * @Author huazai
 * @Date 2024/2/21 11:08
 */
public class CompletableDemo {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        CompletableFuture<Void> completableFuture = CompletableFuture.runAsync(() -> {
            System.out.println(Thread.currentThread().getName() + "completableFuture");
        });

        completableFuture.get();
    }
}
